import axios from 'axios';


export function queryWorktpl(param) {
    return axios({
        method: 'get',
        url: '/procedure/queryIndustryAndType',
        headers: {
            'Cache-Control': 'no-cache'
        },
        params: param
    })
}

export function addWorktpl(param) {
    return axios({
        method: 'post',
        url: '/workquality/insertWorkqualitysFromPreset',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function toggleStatus(param) {
    let url = param.enableStatus ? '/workquality/disable' : '/workquality/enable'
    return axios({
      method: 'post',
      url,
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
  }


  export function referCheck(param) {
    return axios({
        method: 'post',
        url: '/workquality/referCheck',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function getPicUrlByOSS(param) {
    return axios({
        method : 'post',
        url : '/oss/signForAppPic',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}
export function getosssignForPost (param) {
    return axios({
        method : 'get',
        url : '/oss/example/signForPost',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}